<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header');?>
<style>
.clicktrue{cursor:pointer;}
.clicktrue:hover{background:#aaa;cursor:pointer;}
</style>
<form name="myform" action="?m=sgw_jizi&c=jizi_data&a=init&pc_hash=<?=$_GET['pc_hash']?>" method="post">
	选择集子:<select onchange="this.form.submit();" name="j_id">
		<?=$sort_tree?>
	<select/>
</form>
<form name="myform" action="?m=sgw_jizi&c=jizi_data&a=listorder&pc_hash=<?=$_GET['pc_hash']?>" method="post">
<div class="pad-lr-10">
<div class="table-list">
    <table width="100%" cellspacing="0">
        <thead>
            <tr>
            <th >排序</th>
            <th>图片</th>
			<th >商品标题</th>
			<th >销量</th>
            <th>原价/折扣</th>
            <th>卖家昵称</th>
            <th >更新日期</th>
			<th>操作</th>
            </tr>
        </thead>
	<tbody>
		<?php foreach($infos as $val){?>
    	<tr>
    		<td><input name="order_id[<?=$val['id']?>]" type="text" size="3" value="<?=$val['order_id']?>" class="input-text-c"></td>
    		<td><img width="100" height="100" src="<?=$val['pic_path']?>"></td>
    		<td><a href="<?=$val['detail_url']?>" target="_blank"><?=$val['item_title']?></a></td>
    		<td><?=$val['sole']?></td>
    		<td><?=$val['price']?></br><?=$val['pro_price']?></td>
    		<td><?=$val['tb_nick']?></td>
    		<td><?=date("Y-m-d H:i:s",$val['add_time'])?></td>
    		<td><a href="?m=sgw_jizi&c=jizi_data&a=del&item_id=<?=$val['id']?>">删除</a></td>
    	</tr>
    	<?php }?>
	</tbody>
    </table>
<div id="pages"><?=$pages?></div>
</div>
</div>
</div>
    <div class="btn">
    	<input type="hidden" name="dosubmit" id="" value="dosubmit">
    	<input type="submit" class="button" name="dosubmit" value="<?php echo L('listorder')?>" /></div>
</form>
<script type="text/javascript">
var mytrs = $(".mytr");
$(function(){
	mytrs.each(function(i){
			if($(this).attr('pid')!='0'&&$(this).attr('pid')!='1'&&$(this).attr('pid')!='<?=$_GET['list_pid']?>'){
				$(this).hide();
				$(this).attr('hid','1');
			}
		});
	$(".clicktrue").click(function(){
		var pid = $(this).parent().attr('sid');
		var dis = $(this).parent().next().attr('hid');
		if(dis == '1'){
			open(pid);
		}else{
			close(pid);
		}
	});
	function close(pid){
		mytrs.each(function(i){
			if($(this).attr('pid')==pid){
				$(this).attr('hid','1');
				$(this).hide('fast');
				close($(this).attr('sid'));
			}
		});
	}
	function open(pid){
		mytrs.each(function(i){
			if($(this).attr('pid')==pid){
				$(this).attr('hid','0');
				$(this).show('fast');
			}
		});
	}
});
</script>
</body>
</html>